﻿DECLARE @Var_PatientId VARCHAR(100)
SET @Var_PatientId = @PatientId_In

SELECT Id AS registerId,
       KSName AS deptName,
       YSName AS doctorName,
       RegistDate AS regDateTime,
       PayMoney AS totalAmount 
FROM dbo.AP_PreRegist_DongRuan(NOLOCK)
WHERE IsFinish = 1 AND PatientId = @Var_PatientId
ORDER BY RegistDate DESC